package com.tledu.controller;

import com.tledu.domain.Brand;
import com.tledu.service.IBrandService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@AllArgsConstructor
@RequestMapping("/brand")
public class BrandController {

    private IBrandService brandService;

    @GetMapping("/findAll")
    public List<Brand> findAll() {
        return brandService.findAllBrands();
    }
}
